<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>tdl.Window</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tdl-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-tdl/">python-tdl</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="tdl-module.html">Package&nbsp;tdl</a> ::
        Class&nbsp;Window
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="tdl.Window-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Window</h1><p class="nomargin-top"><span class="codelink"><a href="tdl-pysrc.html#Window">source&nbsp;code</a></span></p>
<pre class="base-tree">
  object --+    
           |    
<a href="tdl._MetaConsole-class.html">_MetaConsole</a> --+
               |
              <strong class="uidshort">Window</strong>
</pre>

<hr />
<p>A Window contains a small isolated part of a Console.</p>
  <p>Drawing on the Window draws on the Console.</p>
  <p>Making a Window and setting its width or height to None will extend it
  to the edge of the console.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__contains__"></a><span class="summary-sig-name">__contains__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">position</span>)</span><br />
      Use ((x, y) in console) to check if a position is drawable on this 
      console.
      <em>(Inherited from <a href="tdl._MetaConsole-class.html">tdl._MetaConsole</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.__contains__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl.Window-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">console</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">width</span>,
        <span class="summary-sig-arg">height</span>)</span><br />
      Isolate part of a <a href="tdl.Console-class.html" 
      class="link">Console</a> or <a href="tdl.Window-class.html" 
      class="link">Window</a> instance.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#Window.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl.Window-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      repr(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#Window.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl._MetaConsole-class.html#blit" class="summary-sig-name">blit</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">source</span>,
        <span class="summary-sig-arg">x</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">y</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">width</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">height</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">srcX</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">srcY</span>=<span class="summary-sig-default">0</span>)</span><br />
      Blit another console or Window onto the current console.
      <em>(Inherited from <a href="tdl._MetaConsole-class.html">tdl._MetaConsole</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.blit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl.Window-class.html#clear" class="summary-sig-name">clear</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">fgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">bgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span><br />
      Clears the entire Window.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#Window.clear">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl.Window-class.html#drawChar" class="summary-sig-name">drawChar</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">char</span>,
        <span class="summary-sig-arg">fgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">bgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span><br />
      Draws a single character.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#Window.drawChar">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl.Window-class.html#drawFrame" class="summary-sig-name">drawFrame</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">width</span>,
        <span class="summary-sig-arg">height</span>,
        <span class="summary-sig-arg">string</span>,
        <span class="summary-sig-arg">fgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">bgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span><br />
      Similar to <a href="tdl._MetaConsole-class.html#drawRect" 
      class="link">drawRect</a> but only draws the outline of the 
      rectangle.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#Window.drawFrame">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl.Window-class.html#drawRect" class="summary-sig-name">drawRect</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">width</span>,
        <span class="summary-sig-arg">height</span>,
        <span class="summary-sig-arg">string</span>,
        <span class="summary-sig-arg">fgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">bgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span><br />
      Draws a rectangle starting from x and y and extending to width and 
      height.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#Window.drawRect">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl._MetaConsole-class.html#drawStr" class="summary-sig-name">drawStr</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">string</span>,
        <span class="summary-sig-arg">fgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">bgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span><br />
      Draws a string starting at x and y.
      <em>(Inherited from <a href="tdl._MetaConsole-class.html">tdl._MetaConsole</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.drawStr">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">(int, (r, g, b), (r, g, b))</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl.Window-class.html#getChar" class="summary-sig-name">getChar</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      Return the character and colors of a tile as (ch, fg, bg)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#Window.getChar">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">(int, int)</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getSize"></a><span class="summary-sig-name">getSize</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Return the size of the console as (width, height)
      <em>(Inherited from <a href="tdl._MetaConsole-class.html">tdl._MetaConsole</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.getSize">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl._MetaConsole-class.html#scroll" class="summary-sig-name">scroll</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      Scroll the contents of the console in the direction of x,y.
      <em>(Inherited from <a href="tdl._MetaConsole-class.html">tdl._MetaConsole</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.scroll">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Properties</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="console"></a><span class="summary-name">console</span>
      <em>(Inherited from <a href="tdl._MetaConsole-class.html">tdl._MetaConsole</a>)</em>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="height"></a><span class="summary-name">height</span>
      <em>(Inherited from <a href="tdl._MetaConsole-class.html">tdl._MetaConsole</a>)</em>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="parent"></a><span class="summary-name">parent</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="width"></a><span class="summary-name">width</span>
      <em>(Inherited from <a href="tdl._MetaConsole-class.html">tdl._MetaConsole</a>)</em>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="x"></a><span class="summary-name">x</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="y"></a><span class="summary-name">y</span>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">console</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>,
        <span class="sig-arg">width</span>,
        <span class="sig-arg">height</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#Window.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Isolate part of a <a href="tdl.Console-class.html" 
  class="link">Console</a> or <a href="tdl.Window-class.html" 
  class="link">Window</a> instance.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>console</code></strong> (<a href="tdl.Console-class.html" class="link">Console</a> or <a 
          href="tdl.Window-class.html" class="link">Window</a>) - The parent object which can be a <a href="tdl.Console-class.html"
          class="link">Console</a> or another <a 
          href="tdl.Window-class.html" class="link">Window</a> instance.</li>
        <li><strong class="pname"><code>x</code></strong> (int) - X coordinate to place the Window.
          <p>This follows the normal rules for indexing so you can use a 
          negative integer to place the Window relative to the bottom right
          of the parent Console instance.</p></li>
        <li><strong class="pname"><code>y</code></strong> (int) - Y coordinate to place the Window.
          <p>See x.</p></li>
        <li><strong class="pname"><code>width</code></strong> (int or None) - Width of the Window.
          <p>Can be None to extend as far as possible to the bottom right 
          corner of the parent Console or can be a negative number to be 
          sized reltive to the Consoles total size.</p></li>
        <li><strong class="pname"><code>height</code></strong> (int or None) - Height of the Window.
          <p>See width.</p></li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#Window.__repr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>repr(x)</p>
  <dl class="fields">
    <dt>Overrides:
        object.__repr__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="clear"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">clear</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">fgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="sig-arg">bgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#Window.clear">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Clears the entire Window.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>fgcolor</code></strong> ((r, g, b)) - Foreground color.
          <p>Must be a 3-item list with integers that range 0-255.</p>
          <p>Unlike most other operations you can not use None here.</p></li>
        <li><strong class="pname"><code>bgcolor</code></strong> ((r, g, b)) - Background color.  See fgcolor.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="drawChar"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">drawChar</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>,
        <span class="sig-arg">char</span>,
        <span class="sig-arg">fgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="sig-arg">bgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#Window.drawChar">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Draws a single character.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>x</code></strong> - X coordinate to draw at.</li>
        <li><strong class="pname"><code>y</code></strong> - Y coordinate to draw at.</li>
        <li><strong class="pname"><code>char</code></strong> - Should be an integer, single character string, or None.
          <p>You can set the char parameter as None if you only want to 
          change the colors of the tile.</p></li>
        <li><strong class="pname"><code>fgcolor</code></strong> - For fgcolor and bgcolor you use a 3 item list with integers 
          ranging 0-255 or None.
          <p>None will keep the current color at this position 
          unchanged.</p></li>
        <li><strong class="pname"><code>bgcolor</code></strong> - Background color.  See fgcolor</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>AssertionError</strong></code> - Having x or y values that can't be placed inside of the console 
        will raise an AssertionError. You can use always use ((x, y) in 
        console) to check if a tile is drawable.</li>
    </ul></dd>
    <dt>Overrides:
        <a href="tdl._MetaConsole-class.html#drawChar">_MetaConsole.drawChar</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="drawFrame"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">drawFrame</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>,
        <span class="sig-arg">width</span>,
        <span class="sig-arg">height</span>,
        <span class="sig-arg">string</span>,
        <span class="sig-arg">fgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="sig-arg">bgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#Window.drawFrame">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Similar to <a href="tdl.Window-class.html#drawRect" 
  class="link">drawRect</a> but only draws the outline of the 
  rectangle.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>x</code></strong> - x coordinate to draw at.</li>
        <li><strong class="pname"><code>y</code></strong> - y coordinate to draw at.</li>
        <li><strong class="pname"><code>width</code></strong> - Width of the rectangle.
          <p>Can be None to extend to the bottom right of the console or 
          can be a negative number to be sized reltive to the total size of
          the console.</p></li>
        <li><strong class="pname"><code>height</code></strong> - Height of the rectangle.  See width.</li>
        <li><strong class="pname"><code>string</code></strong> - Should be an integer, single character string, or None.
          <p>You can set the char parameter as None if you only want to 
          change the colors of an area.</p></li>
        <li><strong class="pname"><code>fgcolor</code></strong> - For fgcolor and bgcolor you use a 3 item list with integers 
          ranging 0-255 or None.
          <p>None will keep the current color at this position 
          unchanged.</p></li>
        <li><strong class="pname"><code>bgcolor</code></strong> - Background color.  See fgcolor</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>AssertionError</strong></code> - Having x or y values that can't be placed inside of the console 
        will raise an AssertionError.
        <p>You can use always use ((x, y) in console) to check if a tile is
        drawable.</p></li>
    </ul></dd>
    <dt>Overrides:
        <a href="tdl._MetaConsole-class.html#drawFrame">_MetaConsole.drawFrame</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="drawRect"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">drawRect</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>,
        <span class="sig-arg">width</span>,
        <span class="sig-arg">height</span>,
        <span class="sig-arg">string</span>,
        <span class="sig-arg">fgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="sig-arg">bgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#Window.drawRect">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Draws a rectangle starting from x and y and extending to width and 
  height.</p>
  <p>If width or height are None then it will extend to the edge of the 
  console.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>x</code></strong> - x coordinate to draw at.</li>
        <li><strong class="pname"><code>y</code></strong> - y coordinate to draw at.</li>
        <li><strong class="pname"><code>width</code></strong> - Width of the rectangle.
          <p>Can be None to extend to the bottom right of the console or 
          can be a negative number to be sized reltive to the total size of
          the console.</p></li>
        <li><strong class="pname"><code>height</code></strong> - Height of the rectangle.  See width.</li>
        <li><strong class="pname"><code>string</code></strong> - Should be an integer, single character string, or None.
          <p>You can set the char parameter as None if you only want to 
          change the colors of an area.</p></li>
        <li><strong class="pname"><code>fgcolor</code></strong> - For fgcolor and bgcolor you use a 3 item list with integers 
          ranging 0-255 or None.
          <p>None will keep the current color at this position 
          unchanged.</p></li>
        <li><strong class="pname"><code>bgcolor</code></strong> - Background color.  See fgcolor</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>AssertionError</strong></code> - Having x or y values that can't be placed inside of the console 
        will raise an AssertionError.
        <p>You can use always use ((x, y) in console) to check if a tile is
        drawable.</p></li>
    </ul></dd>
    <dt>Overrides:
        <a href="tdl._MetaConsole-class.html#drawRect">_MetaConsole.drawRect</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="getChar"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getChar</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#Window.getChar">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return the character and colors of a tile as (ch, fg, bg)</p>
  <p>This method runs very slowly as is not recommended to be called 
  frequently.</p>
  <dl class="fields">
    <dt>Returns: (int, (r, g, b), (r, g, b))</dt>
        <dd>Returns a 3-item tuple.  The first item is an integer of the 
          character at the position (x, y) the second and third are the 
          foreground and background colors respectfully.</dd>
    <dt>Overrides:
        <a href="tdl._MetaConsole-class.html#getChar">_MetaConsole.getChar</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tdl-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-tdl/">python-tdl</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0.1 on Wed Dec 05 20:07:32 2012</a>
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
